﻿@model BbsEditModel
@{
    CssLink.Add("~/Content/css/bbsEdit.css");
}

<h1>게시판 관리</h1>
<hr />

<form id="제목폼" class="form-inline">
    <h2>게시판 제목:</h2>
    @Html.TextBox("title", Model.게시판.제목)
    @Html.Hidden("id", Model.게시판.ID)
    <a onclick="게시판제목저장()" class="btn btn-small">제목 저장</a>
</form> 

<h2>게시글 분류:</h2>
<table class="table table-condensed table-bordered">
    <thead>
        <tr>
            <th>no</th>
            <th>제목</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @{ int no = 0; }
        @foreach(var 분류 in Model.게시글분류목록) { 
            <tr>
                <td>@(++no)</td>
                <td><input type="text" value="@분류.제목" /></td>
                <td>
                    <a class="btn btn-small" onclick="게시글분류저장(@분류.ID, this)"><i class="icon-pencil"></i> 저장</a>
                    <a class="btn btn-small" onclick="게시글분류삭제(@분류.ID)"><i class="icon-remove"></i> 삭제</a>
                </td>
            </tr>
        }
        <tr>
            <td></td>
            <td><input type="text" /></td>
            <td>
                <a class="btn btn-small" onclick="게시글분류추가(@Model.게시판.ID, this)"><i class="icon-plus"></i> 추가 </a>
            </td>
        </tr>
    </tbody>
</table>


<hr />
<a onclick="게시판삭제(@Model.게시판.ID)" class="btn btn-small">게시판 삭제</a>
<a href="@Url.BbsArticleList(Model.게시판.ID)" class="btn btn-small">게시글 목록으로</a>
